<!DOCTYPE html>
<html>
	<head>
		<title> Sizing and events</title>
		<link rel="stylesheet" href="../../../codebase/webix.css" type="text/css" charset="utf-8">
		<script src="../../../codebase/webix.js" type="text/javascript" charset="utf-8"></script>

		<link rel="stylesheet" type="text/css" href="../common/samples.css">
		<script src="../common/testdata.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<style type="text/css">
			body, html{
				height:100%;
			}
		</style>
		<div class='header_comment'>Sizing and events</div>
		<div class='sample_comment'>The sample shows how to use events for sizing DataTable.</div>
		<div class='sample_comment'> Try to resize the browser window</div>
		<div id="testA" style='width:50%; height:50%;'></div>
		<script type="text/javascript" charset="utf-8">
		webix.ready(function(){
			grid = new webix.ui({
				container:"testA",
				view:"datatable",
				columns:[
					{ id:"rank",	header:"", css:"rank",  		width:50},
					{ id:"title",	header:"Film title",width:200,	fillspace:true},
					{ id:"year",	header:"Released" , width:80	},
					{ id:"votes",	header:"Votes", 	width:100	}
				],
				data:small_film_set
			});
			webix.event(window, "resize", function(){ grid.adjust(); })
		});

		</script>
	</body>
</html>